<!--<link href="<?php echo $this->config->item('plugin_path');?>tables/jquery.dataTables.css" type="text/css" rel="stylesheet" />
<style>
	.button-table{
		margin-top:10px;
		margin-left:26px;
	}
</style>

<script type="text/javascript" src="<?php echo base_url(); ?>assets/plugins/tables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/responsive-tables/responsive-tables.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>misc/nicescroll/jquery.nicescroll.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
	var oTable = $('#table').dataTable( {
		"bProcessing": true,
		"bServerSide": true,
		"sAjaxSource": '<?php echo base_url(); ?>index.php/history_trouble/datatables_history_trouble',
        "bJQueryUI": true,
        "sPaginationType": "full_numbers",
        "iDisplayStart ":20,
		"aaSorting": [[ 0, "desc" ]],
        "oLanguage": {
			"sProcessing": "<img src='<?php echo base_url(); ?>assets/plugins/tables/ajax-loader_dark.gif'>"
			},  
        "fnInitComplete": function() {
                //oTable.fnAdjustColumnSizing();
         },
                'fnServerData': function(sSource, aoData, fnCallback)
            {
              $.ajax
              ({
                'dataType': 'json',
                'type'    : 'POST',
                'url'     : sSource,
                'data'    : aoData,
                'success' : fnCallback
              });
            }
		});
	});
	function tambah(){
		document.location="<?php echo site_url("history_trouble/form_history_trouble")?>";
	}
</script>
<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default gradient">
			<div class="panel-heading">
				<h4>
					<span>Grid History Trouble</span>
				</h4>
			</div>
			<div class="panel-body noPad clearfix">
				<div class="button-table">
					<button type="submit" class="btn btn-info" onClick="tambah()">
						<span class="icon16 icomoon-icon-plus-circle white"></span>
						Tambah
					</button>
				</div>
				<tr class="odd gradeX">
					<?php 
						echo $this->table->generate();
					?>
				</tr>
			</div>
		</div>
	</div>
</div>
</body>
-->
<style>
	.button-table{
		margin-top:10px;
		margin-left:26px;
	}
</style>

<?php if( isset($message) && $message == "pesan" ) { ?>
	<div class="alert alert-success">
	    <span>Data Berhasil Tersimpan</span>
	</div>
<?php } elseif( isset($message) && $message == "error" ) { ?>
	<div class="alert alert-danger">
	    <span>Cek Kembali Nama Ijin</span>
	</div>
<?php } else { ?>

<?php } ?>

<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default gradient">
			<div class="panel-heading">
				<h4>
					<span>Grid History Trouble</span>
				</h4>
			</div>
			<div class="panel-body noPad clearfix">
				<table cellpadding="0" cellspacing="0" border="0" class="dynamicTable display table table-bordered" width="100%">
					<div class="button-table"><button type="submit" class="btn btn-info" onClick="tambah()"><span class="icon16 icomoon-icon-plus-circle white"></span>Tambah</button></div>
					<thead>
						<tr>
							<th><center>No</center></th>
							<th>Jenis Gangguan</th>
							<th>Tanggal</th>
							<th>Waktu</th>
							<th>Keterangan</th>
							<th>Status</th>
							<!--<th>Status</th>-->
							<th>Edit</th>
							<th>Tindak Lanjut</th>
						</tr>
					</thead>
					<tbody>
					<?php
						$no=0;
						foreach($history_trouble as $row){
						$no++;
					?>
						<tr class="odd gradeX">
							<td><center><?php echo $no; ?></center></td>
							<td><?php echo $row["JENIS_GANGGUAN"]; ?></td>
							<td><?php echo $row["TANGGAL"]; ?></td>
							<td><?php echo $row["WAKTU"]; ?></td>
							<td><?php echo $row["KETERANGAN"]; ?></td>
							<td><?php echo $row["WAKTU"]; ?></td>
							<td>
								<div class="controls center">
									<a href="javascript:edit(<?php echo $row["ID_HISTORY_TROUBLE"]; ?>)" title="Edit History Trouble" class="tip"><span class="icon12 icomoon-icon-pencil"></span></a>
								</div>
							</td>
							<td>
								<div class="controls center">
									<a href="javascript:tindak_lanjut(<?php echo $row["ID_HISTORY_TROUBLE"]; ?>)" title="Tindak Lanjut History Trouble" class="tip"><span class="icon12 icomoon-icon-pencil"></span></a>
								</div>
							</td>
						</tr>
					<?php
					}
					?>
					</tbody>
					<!--<tfoot>
						<tr>
							<th>No</th>
							<th>Nama Ijin</th>
						</tr>
					</tfoot>-->
				</table>
			</div>
		</div><!-- End .panel -->
	</div><!-- End .span12 -->
</div><!-- End .row -->
<link href="<?php echo $this->config->item('plugin_path');?>tables/dataTables/jquery.dataTables.css" type="text/css" rel="stylesheet" />
<link href="<?php echo $this->config->item('plugin_path');?>tables/dataTables/TableTools.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/dataTables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/dataTables/TableTools.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/dataTables/ZeroClipboard.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/responsive-tables/responsive-tables.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('js_path');?>datatable.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>misc/nicescroll/jquery.nicescroll.min.js"></script>
<script language="javascript">
	function tambah(){
		document.location="<?php echo site_url("history_trouble/form_history_trouble"); ?>";
	}
	function edit(id){
		document.location="<?php echo site_url("history_trouble/form_history_trouble"); ?>/" + id;
	}
	function tindak_lanjut(id){
		document.location="<?php echo site_url("history_trouble/tindak_lanjut_trouble"); ?>/" + id;
	}
</script>